package d1130.r211.num16;

import java.util.Objects;

public class Student
{
        private String name;
        private double score;
        private String sNo;

        public Student() {
        }

        public Student(String name, double score, String sNo) {
            this.name = name;
            this.score = score;
            this.sNo = sNo;
        }


        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public double getScore() {
            return score;
        }

        public void setScore(double score) {
            this.score = score;
        }

        public String getsNo() {
            return sNo;
        }

        public void setsNo(String sNo) {
            this.sNo = sNo;
        }

        @Override
        public String toString() {
            return "Student{" +
                    "name='" + name + '\'' +
                    ", score=" + score +
                    ", sNo='" + sNo + '\'' +
                    '}';
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            d1127.r211.num16.Student student = (d1127.r211.num16.Student) o;
            return Double.compare(student.score, score) == 0 && Objects.equals(name, student.name) && Objects.equals(sNo, student.sNo);
        }

        @Override
        public int hashCode() {
            return Objects.hash(name, score, sNo);
        }
    }



